rm(list = ls())
#working_folder<- "/Users/bgpopescu/Library/CloudStorage/Dropbox/covid_institutions/"
working_folder<-"//Mac/Dropbox-1/covid_paper_replication/"
setwd(working_folder)

#This is to obtain:
#-table_A2a
#-table_A2b

library("readxl")
library("dplyr")
library("ggplot2")
library("lemon")
library("xtable")


data_soures1<-read_excel("./data/data_sources1.xlsx",
                     sheet=1, col_names = TRUE, skip = 0)



object_latex<-xtable(data_soures1, digits = 0, type = "latex", caption = "Data Sources",
                     align=c(
                       "p{5cm}",
                       "p{5cm}",
                       "p{8cm}",
                       "p{2cm}",
                       "p{4cm}"))

print(object_latex, file = "./paper/tables/table_A2a.tex", 
      caption.placement = "top",
      booktabs = TRUE,
      include.rownames=FALSE,
      scalebox=0.6)


data_soures2<-read_excel("./data/data_sources2.xlsx",
                         sheet=1, col_names = TRUE, skip = 0)



object_latex<-xtable(data_soures2, digits = 0, type = "latex", caption = "Data Sources - continued",
                     align=c(
                       "p{5cm}",
                       "p{5cm}",
                       "p{8cm}",
                       "p{2cm}",
                       "p{4cm}"))

print(object_latex, file = "./paper/tables/table_A2b.tex", 
      caption.placement = "top",
      booktabs = TRUE,
      include.rownames=FALSE,
      scalebox=0.6)


